package me.raih.util;

import java.text.DecimalFormat;

/**
 * @Author Raih
 * @Time 2021/2/26  19:29
 *
 * 数据 工具
 */
public class MathUtil {

    public static double twoDoubleNumber(double d){
        DecimalFormat df = new DecimalFormat("#.00");
        if(d == 0){
            return 0.0;
        }
        String format = df.format(d);

        return Double.parseDouble(format);
    }

}
